<h1>Archives</h1>
<div id="archives">
{section name=aloop loop=$data}
{if $cyear != $data[aloop].year}<h2>{$data[aloop].year}</h2>{assign var='cyear' value=$data[aloop].year}{/if}
{if $cmonth != $data[aloop].month}<h3>{$data[aloop].month}</h3>{assign var='cmonth' value=$data[aloop].month}{/if}
<ul>
<li class="{$data[aloop].type}"><a href="index.php?mod=news&amp;id={$data[aloop].id}&amp;type={$data[aloop].type}">{$data[aloop].title}</a></li>
</ul>
{/section}
</div>
